//
//  IDCardTableViewCell.m
//  ATMCash
//
//  Created by zhengchengfeng on 2024/9/11.
//

#import "IDCardTableViewCell.h"

@implementation IDCardTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.backgroundColor = [UIColor clearColor];
        
        self.backImgView = [[UIImageView alloc] init];
        [self.contentView addSubview:self.backImgView];
        [self.backImgView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.contentView.mas_left).offset(15);
            make.top.equalTo(self.contentView.mas_top);
            make.right.equalTo(self.contentView.mas_right).offset(-15);
            make.bottom.equalTo(self.contentView.mas_bottom);
        }];
        
        self.nameLab = [Utility createLabel:[UIFont fontWithName:kFuturaMedium size:14] color:[UIColor colorWithHexString:@"#638473"]];
        [self.backImgView addSubview:self.nameLab];
        [self.nameLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.backImgView.mas_left).offset(15);
            make.top.equalTo(self.backImgView.mas_top);
            make.right.equalTo(self.backImgView.mas_right).offset(-60);
            make.bottom.equalTo(self.backImgView.mas_bottom);
        }];
        
        self.iconV = [[UIImageView alloc] init];
        [self.backImgView addSubview:self.iconV];
        [self.iconV mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.equalTo(@9);
            make.height.equalTo(@12);
            make.right.equalTo(self.backImgView.mas_right).offset(-15);
            make.centerY.equalTo(self.nameLab.mas_centerY);
        }];
        
        self.lineV = [[UIView alloc] init];
        [self.backImgView addSubview:self.lineV];
        self.lineV.backgroundColor = [UIColor colorWithHexString:@"#F1F3F2"];
        [self.lineV mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.nameLab.mas_left);
            make.right.equalTo(self.iconV.mas_right);
            make.bottom.equalTo(self.backImgView.mas_bottom);
            make.height.equalTo(@1);
        }];
        
    }
    return self;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
